﻿using System;
using System.Collections.Generic;
using System.Text;

namespace KaixinHouse
{
    // 存储用户名和密码以及用户编号
    public class UserIdentity
    {
        public string userIdx = null;
        public string userName = null;
        public string userMail = null;
        public string userPass = null;

        public UserIdentity() { }

        public UserIdentity(UserIdentity ac)
        {
            this.userIdx = ac.userIdx;
            this.userName = ac.userName;
            this.userMail = ac.userMail;
            this.userPass = ac.userPass;
        }

        public bool equals(UserIdentity u2)
        {
            if (String.IsNullOrEmpty(this.userIdx))
            {
                if (String.IsNullOrEmpty(u2.userIdx))
                {
                    return true;
                }
                else
                {
                    return false;
                }
            }

            if (String.Compare(this.userIdx, u2.userIdx) == 0)
            {
                return true;
            }
            else
            {
                return false;
            }
        }


    }

}
